package com.camunda.workflow.controller.task.service;

import lombok.extern.slf4j.Slf4j;
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.springframework.stereotype.Component;
/**
 * service task type : expression
 */
@Slf4j
@Component("telCall")
public class TelCall {

    public int doCall(DelegateExecution execution){
        log.info("开始电话回访");
        String repairManName = String.valueOf(execution.getVariable("repairManName"));
        log.info("您对"+repairManName+"的服务打几分");
        return 10;
    }

    public void getScore(DelegateExecution execution){
        log.info("查询评分");
        String repairManName = String.valueOf(execution.getVariable("repairManName"));
        int score =  (int)execution.getVariable("score");
        log.info("顾客对"+repairManName+"的评分："+score);
    }
}

